﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GcmpModelInterface.h"
#include "NdbObjectSchematic.h"

namespace gcmp
{ 
    class IParameterValueStorage;

    /// \brief 自定义参数对象接口
    class GCMP_MODEL_INTERFACE_EXPORT IParameterCustomData : public NdbObjectSchematic
    {
        DEFINE_CAST_DERIVED(gcmp::IParameterCustomData, gcmp::NdbObjectSchematic);

    public:
        /// \brief 获取自定义数据ID
        /// \return std::wstring 自定义数据ID
        virtual std::wstring GetCustomDataId() const = 0;

        /// \brief 获取自定义数据版本
        /// \return Int32 数据版本
        virtual Int32  GetVersion() const = 0;

        /// \brief 克隆接口
        /// \return OwnerPtr<IParameterCustomData> 克隆出来的新对象
        virtual OwnerPtr<IParameterCustomData> Clone() const = 0;

        /// \brief 判断当前参数值与给定的参数值是否相等
        ///
        /// \param pOther 另一参数值存储对象指针
        /// \return 两者相同返回true，否则返回false
        virtual bool HasSameValue(const IParameterCustomData* pOther) const = 0;

        /// \brief 判断当前参数值小于给定的参数值
        ///
        /// \param pOther 另一参数值存储对象指针
        /// \return 当前参数值小于给定的参数值返回true，否则返回false
        virtual bool IsLessThan(const IParameterCustomData* pOther) const = 0;

        /// \brief 报告引用的Element的Ids
        ///
        /// \param referenceElementIds 自定义数据中引用的ElementIds
        /// \return void
        virtual void GetReferencedElementIds(std::vector<ElementId>& referenceElementIds) const = 0;
    };
}

